﻿<%@ Page Title="付款" Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="Buy_Pay.aspx.cs" Inherits="map.member.order.Buy_Pay" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
     <link href="/outstyle.css" rel="stylesheet" type="text/css" />
     <script src="/js/dropdowncontent.js" type="text/javascript"></script>
     <style type="text/css">
        .CommandButton
        {
            background:url(/img/back-button_61x23.gif) no-repeat;
            height:23px;
            width:61px;
            border:none;
            cursor:pointer;
        }
        .CommandButton_Large
        {
            background:url(/img/back-button.gif) no-repeat;
            height:23px;
            width:95px;
            border:none;
            cursor:pointer;
        }
        .MainContentDiv
        {
            width:90%;         
            margin:10px 10px 0px 10px;
        }
        .td0
        {
            text-align:right;
            width:15%; 
            padding:3px 0px 3px 0px;
        }
        .td1
        {
            text-align:left;
            width:35%;
            padding:3px 0px 3px 0px;
            color:Blue;
        }
        .PayDiv
        {
            margin-top:5px;
        }
        .payfieldset
        {
              
        }
        .paylengend
        {
             font-size:small  ;
             font-weight:bold;
             padding:0px 5px 0px 5px;
             color:Black;
        }
        .td_e_0
        {
            width:40%;
            text-align:right;
            padding:3px 0px 3px 0px;
        }
        .td_e_1
        {
            width:60%;
            text-align:left; 
            padding:3px 0px 3px 0px; 
            color:Blue;
        }
         .SubmitCharge
        {
            background:url(/img/btnTmp_orange.png) no-repeat 0px 0px;
            border:none;
            text-align:center;
            padding-left:20px;
            font-weight:bold ;
            cursor:pointer ;
            width:82px;
            height:34px;
        }
        
        .validateErrorMsg
        {
            background:url(/img/errorMsg.ico) no-repeat ;
            padding-left:20px;
            border:solid 1px red;
            font-size:smaller;
            padding:1px 2px 1px 20px;  
            color:Red;
        }   
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
     <div class="MainContentDiv">
          <div style="  padding:5px 5px 5px 5px;">
              <fieldset class="payfieldset">
                <legend class="paylengend">
                     请您确认付款信息 
                </legend>
                  <div style=" margin:5px 5px 5px 5px">
                    <table cellpadding="0" cellspacing="0" style="width:100%;"  >
                        <tr>
                            <td  style=" width:12%; text-align:right;">
                                付款类型：
                            </td>
                            <td style=" width:88%;text-align:left;">
                                <span style=" font-weight:bold " id="PayTypeSpan" runat="server"></span>
                            </td>                     
                        </tr>
                  </table>
                    <div id="OrderPay" class="PayDiv">
                      <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>                            
                            <td style=" width:80%">
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td class ="td0">
                                            商品名称：
                                        </td>
                                        <td class ="td1">
                                            <span id="ItemNameSpan" runat="server"></span>
                                        </td>          
                                        <td class ="td0">
                                            总价：
                                        </td>
                                        <td class ="td1">
                                            <span id="ItemPaymentSpan" runat="server"></span>元
                                        </td>                    
                                    </tr>
                                    <tr>
                                        <td class ="td0">
                                            物流方式：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemPostTypeSpan" runat="server"></span>
                                        </td>          
                                        <td class ="td0">
                                            物流费用：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemPostFeeSpan" runat="server"></span>元
                                        </td>                    
                                    </tr>
                                    <tr>
                                        <td class ="td0">
                                            订单时间：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemOrderTimeSpan" runat="server"></span>
                                        </td>          
                                        <td class ="td0">
                                            单价：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemSinglePriceSpan" runat="server"></span>元
                                        </td>                    
                                    </tr>
                                    
                                    <tr>
                                        <td class ="td0">
                                            <span id="NickTypeSpan" runat="server"></span>：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemSellerNickSpan" runat="server"></span>
                                            <span id="ItemBuyerNickSpan" runat="server"></span>
                                        </td>          
                                        <td class ="td0">
                                            数量：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemBuyCountSpan" runat="server"></span>个/件
                                        </td>                    
                                    </tr>
                                    <tr>
                                        <td class ="td0">
                                            订单状态：
                                        </td>
                                        <td class ="td1"> 
                                            <span id="ItemOrderStatusSpan" runat="server"></span>
                                        </td>          
                                        <td class ="td0">
                                            &nbsp;
                                        </td>
                                        <td class ="td1"> 
                                            &nbsp;
                                        </td>                    
                                    </tr>
                                  </table>
                            </td>
                            <td style=" width:20%; text-align:center;">
                                <img  src="" style=" width:80px; height:70px;" alt="商品图片" id="ItemImg" runat="server"/>
                            </td>
                        </tr>                    
                      </table>                  
                  </div>
                  </div>
              </fieldset>
              <br />
              <fieldset class="payfieldset">
                <legend class="paylengend">
                     输入密码： 
                </legend>
                  <div style=" margin:5px 5px 5px 5px"> 
                      <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="td_e_0">
                                用户名：
                            </td>            
                            <td class="td_e_1">
                                <span id="UserIdSpan"  ><%= AliApi.appUserId  %></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_e_0">
                                密码：
                            </td>            
                            <td class="td_e_1">
                                <input  type="password" style=" width:150px;" maxlength="20" id="PasswordInput" runat="server"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_e_0">
                                验证码：
                            </td>            
                            <td class="td_e_1">
                                 <table>
                                    <tr>
                                        <td style=" vertical-align:top; ">
                                            <input  type="text" id="CheckupCodeInput" style=" width:80px" value="" />
                                        </td>
                                        <td style=" vertical-align:top; ">
                                            <img   title="不区分大小写" src ="/controls/RandomCheckupCoding.aspx?count=4&key=test" id="checkupImg"/>
                                        </td>
                                        <td style=" vertical-align:middle ; ">
                                            <a title="不区分大小写" href ="#1" onclick="refreshCheckupImg();" style=" font-size:smaller;">看不清楚，换一张</a>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                         <tr>
                            <td class="td_e_0">
                                &nbsp;
                            </td>            
                            <td class="td_e_1">
                                <asp:Button  runat="server" ID="ConfirmButton" 
                                    OnClientClick="return validateSubmit();" class="SubmitCharge" Text="确认" 
                                    onclick="ConfirmButton_Click"/>
                            </td>
                        </tr>
                      </table>   
                      <div style=" text-align:center; margin:10px 0px 10px 0px;">
                        <span id="InformationSpan" runat="server" style="border:solid 1px #FAA041; padding:3px 3px 3px 3px; background-color:#FCFBCC"></span>
                      </div>
                  </div>
              </fieldset>               
          </div>           
     </div>
     <script src="/js/PageValidateUtil.js" type="text/javascript"></script>
     <script type="text/javascript">
         var idPrefix = "ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_";
         //刷新验证码
         function refreshCheckupImg() {
             var checkupImg = document.getElementById("checkupImg");
             checkupImg.src = "/controls/RandomCheckupCoding.aspx?count=4&key=test&dd=" + Date().toString();
         }
         //验证码
         function validateCheckUp() {
             var checkupInput = document.getElementById("CheckupCodeInput");
             var result = AjaxFunction.GetSessionValue("test_checkcode");
             if (result.value != null && result.value != "") {
                 return (result.value.toLowerCase() == checkupInput.value.toLowerCase());
             }
             return false;
         }
         function validatePassword() {
             var userid = document.getElementById("UserIdSpan").innerHTML;
             var password = document.getElementById(idPrefix + "PasswordInput").value;
             var result = AjaxFunction.ValidatePassword(userid, password);
             if (result.value != null && result.value == true)
                 return true;
             return false;
         }
         PageValidateUtil.CustomerValidate("CheckupCodeInput", validateCheckUp, "验证码不正确！", "validateErrorMsg", 2);
         PageValidateUtil.CustomerValidate(idPrefix + "PasswordInput", validatePassword, "密码不正确", "validateErrorMsg", 2);

         function validateSubmit() {
             var errorCount = PageValidateUtil.initImidValidates(["CustomerValidate", "CustomerValidate"], [
                            ["CheckupCodeInput", validateCheckUp, "验证码不正确！", "validateErrorMsg", 1],
                            [idPrefix + "PasswordInput", validatePassword, "密码不正确", "validateErrorMsg", 1]]);
             return (errorCount <= 0);
         }
     </script>
</asp:Content>
